﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CostRecordForm.aspx.cs"
    Inherits="YhmOA.Integrated.Car.CostRecordForm" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=c6bed6029ccaee5e"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=c6bed6029ccaee5e"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.1, Version=10.1.6.0, Culture=neutral, PublicKeyToken=c6bed6029ccaee5e"
    Namespace="DevExpress.Web.ASPxLoadingPanel" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link type="text/css" rel="Stylesheet" href="../../Styles/Common.css" />
    <script type="text/javascript" src="../../Scripts/jquery-1.5.2.min.js"></script>
    <script type="text/javascript" src="../../Scripts/include.jquery.js"></script>
    <script type="text/javascript" src="../../Scripts/Common.js"></script>
    <script src="../../Scripts/DevEx.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="MainRound">
        <div class="MainRoundContent">
            <div class="MainRoundContentW">
                <div class="MainBody">
                    <table class="Table" style="width: 370px">
                        <tr>
                            <td style="width: 120px">
                                车牌号码：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxComboBox ID="txt_PlateNum" runat="server" Width="200px" TabIndex="1" ClientInstanceName="txt_PlateNumCtrl"
                                    Spacing="0" DropDownStyle="DropDown" IncrementalFilteringMode="StartsWith" ClientIDMode="AutoID"
                                    ValueType="System.String">
                                    <ClientSideEvents Init="DevExObj.OnInit" LostFocus="DevExObj.OnLostFocus" GotFocus="DevExObj.OnGotFocus"/>
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入车牌号码"
                                        ErrorFrameStyle-CssClass="TableNoBorder" ErrorText="请输入车牌号码">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                费用类型：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxComboBox ID="txt_CostType" ClientInstanceName="txt_CostTypeCtrl" runat="server"
                                    Width="200px" TabIndex="2" CssClass="TableNoBorder" Spacing="0">
                                    <Items>
                                        <dx:ListEditItem Text="燃料费用" Value="燃料费用" />
                                        <dx:ListEditItem Text="维修费用" Value="维修费用" />
                                        <dx:ListEditItem Text="违章费用" Value="违章费用" />
                                        <dx:ListEditItem Text="投保费用" Value="投保费用" />
                                        <dx:ListEditItem Text="购买费用" Value="购买费用" />
                                        <dx:ListEditItem Text="过路费用" Value="过路费用" />
                                        <dx:ListEditItem Text="事故费用" Value="事故费用" />
                                        <dx:ListEditItem Text="停车费用" Value="停车费用" />
                                        <dx:ListEditItem Text="车位年费" Value="车位年费" />
                                    </Items>
                                    <ClientSideEvents Init="DevExObj.OnInit" LostFocus="DevExObj.OnLostFocus" GotFocus="DevExObj.OnGotFocus" />
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请选择费用类型"
                                        ErrorFrameStyle-CssClass="TableNoBorder" ErrorText="请选择费用类型">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                费用：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxTextBox ID="txt_Cost" ClientInstanceName="txt_CostCtrl" runat="server" MaxLength="9"
                                    NullText="请输入费用" TabIndex="3" Width="200px">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入费用"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                        <RegularExpression ErrorText="只能输入非负数字" ValidationExpression="^\d+(\.\d+)?$" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxTextBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                费用支出时间：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxDateEdit ID="txt_Time" ClientInstanceName="txt_TimeCtrl" runat="server" TabIndex="4"
                                    NullText="请选择费用支出时间" Width="200px" Spacing="0" PopupVerticalAlign="TopSides"
                                    EditFormat="DateTime">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请选择费用支出时间"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxDateEdit>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                费用支出人员：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxComboBox ID="txt_Operator" runat="server" Width="200px" TabIndex="5" ClientInstanceName="txt_OperatorCtrl"
                                    Spacing="0" DropDownStyle="DropDown" IncrementalFilteringMode="StartsWith" ClientIDMode="AutoID"
                                    ValueType="System.String">
                                    <ClientSideEvents Init="DevExObj.OnInit" LostFocus="DevExObj.OnLostFocus" GotFocus="DevExObj.OnGotFocus" />
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入费用支出人员"
                                        ErrorFrameStyle-CssClass="TableNoBorder" ErrorText="请输入费用支出人员">
                                        <RequiredField IsRequired="True" />
                                    </ValidationSettings>
                                </dx:ASPxComboBox>
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 120px">
                                备注：
                            </td>
                            <td style="width: 250px">
                                <dx:ASPxMemo ID="txt_Remarks" runat="server" MaxLength="250" NullText="请输入备注" Height="80px"
                                    ClientInstanceName="txt_RemarksCtrl" TabIndex="6" Width="200px">
                                    <ValidationSettings ErrorDisplayMode="ImageWithTooltip" RequiredField-ErrorText="请输入备注"
                                        ErrorFrameStyle-CssClass="TableNoBorder">
                                    </ValidationSettings>
                                    <NullTextStyle ForeColor="LightSteelBlue" />
                                </dx:ASPxMemo>
                            </td>
                        </tr>
                    </table>
                    <br />
                    <table class="TableNoBorder" style="width: 370px">
                        <tr>
                            <td colspan="2" />
                            <td align="left" style="margin-right: 20px; width: 100px">
                                <dx:ASPxButton ID="btnSave" runat="server" Text="保  存" Width="80px" AutoPostBack="false"
                                    TabIndex="7">
                                    <ClientSideEvents Click="function(s,e){
                            if(ASPxClientEdit.ValidateEditorsInContainer(null)){
                                cbSaveCtrl.PerformCallback();
                                lpSaveCtrl.Show();
                            }
                        }" />
                                </dx:ASPxButton>
                            </td>
                            <td align="left" style="margin-right: 20px; width: 100px">
                                <dx:ASPxButton ID="btnCancel" runat="server" Text="重  置" Width="80px" TabIndex="8" AutoPostBack="false">
                                    <ClientSideEvents Click="function(s,e){ASPxClientEdit.ClearEditorsInContainer(null);}" />
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                    <dx:ASPxCallback ID="cbSave" runat="server" ClientInstanceName="cbSaveCtrl" OnCallback="cbSave_Callback">
                        <ClientSideEvents CallbackComplete="function(s, e) {
                                if(s.cpIsSucceed == true){
                                    lpSaveCtrl.SetText('提交成功');
                                    window.setTimeout(function(){lpSaveCtrl.Hide();lpSaveCtrl.SetText('正在提交信息,请稍后...');},1500);
                                }else{
                                    lpSaveCtrl.SetText('提交失败');
                                    window.setTimeout(function(){lpSaveCtrl.Hide();lpSaveCtrl.SetText('正在提交信息,请稍后...');},1500);
                                }
                            }" />
                    </dx:ASPxCallback>
                    <dx:ASPxLoadingPanel ID="lpSave" runat="server" Text="正在提交信息,请稍后..." ClientInstanceName="lpSaveCtrl">
                    </dx:ASPxLoadingPanel>
                </div>
            </div>
        </div>
    </div>
    </form>
</body>
</html>
